﻿#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    w.setWindowTitle("曲线预览室");
    w.setWindowIcon(QIcon(":/images/loge.svg"));
    if(argc>1)
    {
        QStringList list;
        for(int i=1;i<argc;++i){
            QString s = argv[i];
            if(s.endsWith("out")||s.endsWith("csv")||s.endsWith("xlsx"))
                list.append(QString::fromLocal8Bit(argv[i]));
        }
        w.openFiles(list);
    }
    return a.exec();
}
